<?php
require_once(dirname(__FILE__).'/include/common.inc.php');
require_once(DEDEINC.'/memberlogin.class.php');

$keeptime = isset($keeptime) && is_numeric($keeptime) ? $keeptime : -1;
$cfg_ml = new MemberLogin($keeptime);

echo 'document.write(\'';
//判断用户是否登录
$myurl = '';
$Escape = '    ';
if($cfg_ml->IsLogin())
{
	$myurl = $cfg_memberurl."/index.php?uid=".urlencode($cfg_ml->M_LoginID);
	if(!ereg('^http:',$myurl))
	{
		$myurl = $cfg_basehost.$myurl;
	}
	echo '<span><a href='.$myurl.' target="_parent"><font color="#E50000">'.$cfg_ml->M_UserName.'</font></a></span>'.$Escape.
		'<span><img src="'.$cfg_templeturl.'/images/kongjian.gif" align="absmiddle"><a href='.$myurl.' target="_parent">我的空间</a></span>'.$Escape.
		'<span><img src="'.$cfg_templeturl.'/images/tiezi.gif" align="absmiddle"><a href="'.$cfg_memberurl.'/content_list.php?channelid=2" target="_parent">相册管理</a></span>'.$Escape.
		'<span><img src="'.$cfg_templeturl.'/images/xiaoxi.gif" align="absmiddle"> <a href="'.$cfg_memberurl.'/pm.php?TB_iframe=true&height=600&width=700" target="_parent">短消息</a></span>'.$Escape.
		'<span><a href="'.$cfg_memberurl.'/index_do.php?fmdo=login&dopost=exit" target="_parent"><img src="'.$cfg_templeturl.'/images/tuichu.gif" border="0" align="absmiddle"></a></span>';
}
else
{
	echo '<span><a href='.$cfg_memberurl.'/login.php>'.'会员登录</a></span>'.$Escape.
		'<span><a href="'.$cfg_memberurl.'/reg_new.php" target="_blank">注册</a></span>'.$Escape.
		'<span><img src="'.$cfg_templeturl.'/images/kongjian.gif" align="absmiddle"><a href='.$cfg_memberurl.'/index.php target="_parent">我的空间</a></span>';
}
echo '\');';
?>